package main

import (
	"google.golang.org/grpc"
	qy "gitee.com/go_rpc_echo/qiye"
	"golang.org/x/net/context"
	"log"
)

func main(){
	//var opts []grpc.DialOption
	conn,_ := grpc.Dial("111.231.100.76:10005",grpc.WithInsecure())
	defer conn.Close()
	client:=qy.NewQiyeRpcClient(conn)
	ctx := context.Background()
	qi:=&qy.QiyeInfo{Corpid:"wwc32bdd5ca1639679",Corpsecret:"",Corpalarmsecret:"O0YtonSWKC7Z14_xNY2kJ6kv8dWwy_XlhN-rAHkcpu0"}
	//msg,_:=client.GetAccessToken(ctx,qi)
	//log.Print(msg)
	ret,_ := client.SendText(ctx,&qy.SendTextRequest{Text:"hello",Qi:qi})
	log.Println(ret)

}
